package com.k4rthik.clipall.commons;

/**
 * Created by IntelliJ IDEA.
 * User: k4rthik
 * Date: 3/21/12
 * Time: 3:26 PM
 */

public class Logger
{
    public static void log(String logMessage)
    {
        log(logMessage, Level.INFO);
    }

    public static void log(String logMessage, Throwable e)
    {
        log(logMessage, e, Level.ERROR);
    }

    public static void log(String logMessage, Throwable e, Level logLevel)
    {
        log(logMessage+"\nError stacktrace:\n", logLevel);
        e.printStackTrace();
    }

    public static void log(String logMessage, Level logLevel)
    {
        System.out.println("["+logLevel.toString()+"] "+logMessage);
    }
}
